package com.itcast.demo.thread_test.config;

import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@ToString
@Component
@ConfigurationProperties(prefix = "async.executor.thread")
public class ThreadEntity implements Serializable {
    private Integer core_pool_size;
    private Integer max_pool_size;
    private Integer queue_capacity;
    private Integer keep_alive_time;
    private Integer await_termination_seconds;

    private String rejected_execution_handler_type;
    private String thread_name_prefix;

    public Integer getCore_pool_size() {
        return core_pool_size;
    }

    public void setCore_pool_size(Integer core_pool_size) {
        this.core_pool_size = core_pool_size;
    }

    public Integer getMax_pool_size() {
        return max_pool_size;
    }

    public void setMax_pool_size(Integer max_pool_size) {
        this.max_pool_size = max_pool_size;
    }

    public Integer getQueue_capacity() {
        return queue_capacity;
    }

    public void setQueue_capacity(Integer queue_capacity) {
        this.queue_capacity = queue_capacity;
    }

    public Integer getKeep_alive_time() {
        return keep_alive_time;
    }

    public void setKeep_alive_time(Integer keep_alive_time) {
        this.keep_alive_time = keep_alive_time;
    }

    public Integer getAwait_termination_seconds() {
        return await_termination_seconds;
    }

    public void setAwait_termination_seconds(Integer await_termination_seconds) {
        this.await_termination_seconds = await_termination_seconds;
    }

    public String getRejected_execution_handler_type() {
        return rejected_execution_handler_type;
    }

    public void setRejected_execution_handler_type(String rejected_execution_handler_type) {
        this.rejected_execution_handler_type = rejected_execution_handler_type;
    }

    public String getThread_name_prefix() {
        return thread_name_prefix;
    }

    public void setThread_name_prefix(String thread_name_prefix) {
        this.thread_name_prefix = thread_name_prefix;
    }
}
